import log
import usys
from machine import UART
import Logger

from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)

def uart_call(para):
    print(para)
uart1.set_callback(uart_call)

 

# ========== 使用示例 ==========
if __name__ == "__main__":
    my_log = Logger("TestLog")  # 创建日志实例
    my_log.info("send info")  # 默认输出到 UART

    # 切换到交互口输出
    my_log.set_output_console()
    my_log.info("send info")
